unit AylikPersonelPerformansTanim;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, FormClass, XPMan, StdActns, ActnList, cxStyles, cxCustomData,
  cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData,
  cxCheckBox, cxDBLookupComboBox, cxCalendar, ADODB, cxGridLevel,
  cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
  cxControls, cxGridCustomView, cxGrid, ComCtrls, cxTextEdit, siComp,
  siLngLnk;

type
  TfmAylikPersonelPerformansTanim = class(TfmFormClass)
    PC1: TPageControl;
    TS1: TTabSheet;
    Grid1: TcxGrid;
    grdBolumHedef: TcxGridDBTableView;
    grdBolumHedefSira: TcxGridDBColumn;
    grdBolumHedefisim: TcxGridDBColumn;
    grdBolumHedefcDefault: TcxGridDBColumn;
    Grid1Level1: TcxGridLevel;
    TS2: TTabSheet;
    cxGrid1: TcxGrid;
    grdPerformans: TcxGridDBTableView;
    cxGridDBColumn1: TcxGridDBColumn;
    cxGridDBColumn2: TcxGridDBColumn;
    cxGridDBColumn3: TcxGridDBColumn;
    cxGridLevel1: TcxGridLevel;
    dsAylikPPBolumHedef: TDataSource;
    aqAylikPPBolumHedef: TADOQuery;
    dsAylikPPBolumPerformans: TDataSource;
    aqAylikPPBolumPerformans: TADOQuery;
    grdBolumHedefAktif: TcxGridDBColumn;
    Personel_BolumQ: TADOQuery;
    dsPersonel_BolumQ: TDataSource;
    TabSheet1: TTabSheet;
    cxGrid2: TcxGrid;
    cxGridDBTableView1: TcxGridDBTableView;
    cxGridLevel2: TcxGridLevel;
    aqAPP: TADOQuery;
    dsAPP: TDataSource;
    cxGridDBTableView1Yil: TcxGridDBColumn;
    cxGridDBTableView1Ay: TcxGridDBColumn;
    cxGridDBTableView1Donem: TcxGridDBColumn;
    cxGridDBTableView1Sira: TcxGridDBColumn;
    grdBolumHedefGorevId: TcxGridDBColumn;
    Personel_GorevQ: TADOQuery;
    dsPersonel_GorevQ: TDataSource;
    grdBolumHedefBolumHedef: TcxGridDBColumn;
    grdBolumHedefTers: TcxGridDBColumn;
    grdBolumHedefAgirlik: TcxGridDBColumn;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormShow(Sender: TObject);
    procedure aqAylikPPBolumHedefBeforePost(DataSet: TDataSet);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fmAylikPersonelPerformansTanim: TfmAylikPersonelPerformansTanim;

implementation
uses data, ana1;
{$R *.dfm}

procedure TfmAylikPersonelPerformansTanim.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  inherited;
  Action := caFree;
  fmAylikPersonelPerformansTanim := nil;
end;

procedure TfmAylikPersonelPerformansTanim.FormShow(Sender: TObject);
begin
  inherited;
  OpenQueryOnDataSet(aqAPP.SQL.Text, aqAPP);
  OpenQueryOnDataSet(aqAylikPPBolumHedef.SQL.Text, aqAylikPPBolumHedef);
  OpenQueryOnDataSet(aqAylikPPBolumPerformans.SQL.Text, aqAylikPPBolumPerformans);
  OpenQueryOnDataSet(Personel_GorevQ.SQL.Text, Personel_GorevQ);
  OpenQueryOnDataSet(Personel_BolumQ.SQL.Text, Personel_BolumQ);
end;

procedure TfmAylikPersonelPerformansTanim.aqAylikPPBolumHedefBeforePost(
  DataSet: TDataSet);
begin
  inherited;
  if DataSet.FieldByName('Aktif').isNull then
    DataSet.FieldByName('Aktif').Value := True;
end;

end.

